package com.wits.platform.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
@Embeddable
public class MmrRoleMenuPK implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2220674141932508661L;

	public MmrRoleMenuPK(){
		
	}
	
	public MmrRoleMenuPK(String muId,String roleId){
		this.muId=muId;
		this.roleId=roleId;
	}
	
	private String roleId;
	
	private String muId;
	
	

	@Column(name="role_id",length=32)
	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	@Column(name="mu_id",length=32)
	public String getMuId() {
		return muId;
	}

	public void setMuId(String muId) {
		this.muId = muId;
	}

    @Override 
    public int hashCode() { 
        final int prime = 31; 
        int result = 1; 
        result = prime * result + ((roleId == null) ? 0 : roleId.hashCode()); 
        result = prime * result    + ((muId == null) ? 0 : muId.hashCode()); 
        return result; 
    } 
 
    @Override 
    public boolean equals(Object obj) { 
        if (this == obj) 
            return true; 
        if (obj == null) 
            return false; 
        if (getClass() != obj.getClass()) 
            return false; 
        final MmrRoleMenuPK other = (MmrRoleMenuPK) obj; 
        if (roleId == null) { 
            if (other.roleId != null) 
                return false; 
        } else if (!roleId.equals(other.roleId)) 
            return false; 
            if (muId == null) { 
                if (other.muId != null) 
                    return false; 
            } else if (!muId.equals(other.muId)) 
                return false; 
        return true; 
    }
}
